//
//  GlobalMacro.swift
//  DemoRecord
//
//  Created by 郝佳佳 on 16/8/15.
//  Copyright © 2016年 郝佳佳. All rights reserved.
//

import UIKit

let SCREEN_WIDTH = UIScreen.main.bounds.size.width
let SCREEN_HEIGHT = UIScreen.main.bounds.size.height
let MARGIN: CGFloat = 10


//颜色
let MAJORCOLOR = colorWithRGB(rgb: 0xff552e)
let BLUECOLOR = colorWithRGB(rgb: 0x045d95)
let REDCOLOR = colorWithRGB(rgb: 0xf76868)
let GRAYCOLOR_BACKGROUND = colorWithRGB(rgb: 0xf7f7f7)


//@objc class Common:NSObject{
//    let MAJORCOLOR = UIColor.init(rgb: 0xff552e)
//    let BLUECOLOR = UIColor.init(rgb: 0x045d95)
//    let REDCOLOR = UIColor.init(rgb: 0xf76868)
//    let GRAYCOLOR_BACKGROUND = UIColor.init(rgb: 0xf7f7f7)
//}

func colorWithRGB(rgb: UInt,alpha: CGFloat = 1.0) -> UIColor{
   return UIColor.init(
        red: CGFloat((rgb & 0xFF0000) >> 16) / 255.0,
        green: CGFloat((rgb & 0x00FF00) >> 8) / 255.0,
        blue: CGFloat(rgb & 0x0000FF) / 255.0,
        alpha: alpha
    )
}

